package com.wdl.modules.myhouse.dto.sys;

import com.wdl.modules.myhouse.entity.sys.SysRoleEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;


/**
 * 
 *
 * @author lucain sunlightcs@gmail.com
 * @since 1.0.0 2022-08-23
 */
@Data
@ApiModel(value = "系统用户")
public class SysUserDTO implements Serializable,UserDetails {
    private static final long serialVersionUID = 1L;

	@ApiModelProperty(value = "id")
	private Integer id;

	@ApiModelProperty(value = "用户名称")
	private String username;

	@ApiModelProperty(value = "密码")
	private String password;

	@ApiModelProperty(value = "1开启0关闭")
	private Integer status;

	@ApiModelProperty(value = "用户角色")
	private List<SysRoleEntity> roles;


	@Override
	public Collection<? extends GrantedAuthority> getAuthorities() {
		return null;
	}

	@Override
	public boolean isAccountNonExpired() {
		return false;
	}

	@Override
	public boolean isAccountNonLocked() {
		return false;
	}

	@Override
	public boolean isCredentialsNonExpired() {
		return false;
	}

	@Override
	public boolean isEnabled() {
		return false;
	}
}